<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
  <head>
    <title>想法</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/timeago.js"></script>
  </head>
  
  <body>
    <%@include file="include/topbar.jsp" %>

	<div class="container" style="margin-top: 60px">
			<div class="row">
				<jsp:include page="include/left.jsp">
					<jsp:param value="idea" name="tag"/>
				</jsp:include>
	<div class="span9">
			<ul style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px" class="breadcrumb">
				<li class="active">
					<a href="#"><i class="icon-fire"></i>想法</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a class="link-black" href="newidea.jspx">发表想法</a></li>
			</ul>
			<div style="margin-bottom:20px;" class="wall">
				<div id="idea">
				
				<c:if test="${empty list}">
					<h3>还没有想法, 创建一个<a href="newidea.jspx">想法</a></h3>
				</c:if>
				
				<c:forEach var="idea" items="${list}">
				<blockquote>
				  <h4><a href="idea.jspx?id=${idea.id}">${idea.title}</a></h4>
				  <p style="font-size:14px;line-height:1.5;text-indent: 2em;">
				  <c:choose>
				  	<c:when test="${fn:length(idea.content) gt 100}">
				  		${fn:substring(idea.content, 0, 100)}…
				  	</c:when>
				  	<c:otherwise>
				  		${idea.content}
				  	</c:otherwise>
				  </c:choose>
				  </p>
				  <small>${idea.name eq employee.name ? '我' : idea.name}发布于<abbr class="timeago" title="${idea.createtime}"></abbr></small>
				  <c:if test="${idea.name eq employee.name}">
				  <a title="编辑" href="editidea.jspx?id=${idea.id}"><i class="icon-pencil"></i></a>
				  </c:if>
				</blockquote>
				</c:forEach>
				</div>
				
				<!--  <div class="pagination pull-right">
				  <ul>
					<li><a href="#">Prev</a></li>
					<li class="active">
					  <a href="#">1</a>
					</li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">Next</a></li>
				  </ul>
				</div>-->
				
				<div class="clear"></div>
			</div>
		</div>
		</div>
	</div>
	
	<script type="text/javascript">
		$(function() {
			$("abbr.timeago").timeago();
		});
	</script>
</body>
</html>
